using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using QLNS.Data;


namespace QLNS.Control
{
    public class TrinhDoNgoaiNgu_ctrl
    {
        TrinhDoNgoaiNgu_db tdnn = new TrinhDoNgoaiNgu_db();
        public DataRow NewRow()
        {
            return tdnn.NewRow();
        }
        public void Add(DataRow row)
        {
            tdnn.Add(row);
        }
        public bool Save()
        {
            return tdnn.Save();
        }

        public void DanhSachTrinhDoNgoaiNgu(System.Windows.Forms.DataGridView dg, System.Windows.Forms.BindingNavigator bn)
        {
            System.Windows.Forms.BindingSource bs = new System.Windows.Forms.BindingSource();
            DataTable tbl = tdnn.DanhSachTrinhDoNgoaiNgu();
            bs.DataSource = tbl;
            bn.BindingSource = bs;
            dg.DataSource = bs;
        }
    }
}
